import api from 'api/security/menu'
import * as types from './mutation_type'

export default {
  getMenuList({ commit }){
    api.getMenuList().then(response => {
      if (response.status != 200) {
        commit(types.FAILURE_GET_MENULIST)
      } else {
        commit(types.SUCCESS_GET_MENULIST, response.data)
      }
    }), response => {
      commit(types.FAILURE_GET_MENULIST)
    }
  }
}
